home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / amipop17.zip / AMIPOP1.6-A < prev    next >
Internet Message Format  |  1993-11-23  |  4KB

  1. From too@snakemail.hut.fi Wed Nov 17 06:16:17 1993
  2. Received: from lk-hp-13.hut.fi (lk-hp-14.hut.fi) by ucssun1.sdsu.edu (4.1/1.34)
  3.     id AA08075; Wed, 17 Nov 93 06:16:12 PST
  4. From: too@snakemail.hut.fi
  5. Received: by lk-hp-13.hut.fi (5.65c8/8.0/S-TeKoLa)
  6.     id AA04850; Wed, 17 Nov 1993 16:15:26 +0200
  7. Date: Wed, 17 Nov 1993 16:15:26 +0200
  8. Message-Id: <199311171415.AA04850@lk-hp-13.hut.fi>
  9. To: sellis@ucssun1.sdsu.edu
  10. In-Reply-To: scotte@137.110.11.73's message of 15 Nov 1993 05:15:44 GMT
  11. Subject: Re: AmiPOP 1.6 (again)
  12. X-Charset: ASCII
  13. X-Char-Esc: 29
  14. Status: O
  15. X-Status: OR
  16.  
  17. Hello
  18.  
  19. I did the AmiTCP/IP port for AmiPOP (It took less than a hour, thanks for
  20. localizing network part to only one file). I just moved network related
  21. include files from pop.h to pop_dopop.h and added some defines and made
  22. separate OpenLibrary() for AS225 and AmiTCP/IP (AmiPOP-AmiTCP compiles for
  23. AS225 too). I changed nothing else so it should work as the original.
  24.  
  25. I have one suggestion to make so that future ports comes a little more
  26. straightforward to make (I had an intention to connect you earlyer, but
  27. other businesses took my time). Move the network related include files from
  28. pop.h to pop_dopop.c (Since those files are used only in one file, it
  29. doesn't slow down compile time even not included in GST).
  30.  
  31. hmm, I'll include a context diff what I've done to AmiPOP16 to make and
  32. motivate (possible) work a little bit :)
  33.  
  34. laphroaig source % diff -c pop.h.old pop.h
  35. *** pop.h.old   Tue Sep 14 19:44:32 1993
  36. --- pop.h       Thu Oct 21 22:09:46 1993
  37. ***************
  38. *** 23,37 ****
  39.   #include <graphics/gfxbase.h>
  40.   #include <workbench/startup.h>
  41.   #include <devices/timer.h>
  42. - #include <sys/types.h>
  43. - #include <sys/socket.h>
  44. - #include <sys/param.h>
  45.   #include <stdio.h>
  46.   #include <stdlib.h>
  47.   #include <string.h>
  48. - #include <errno.h>
  49. - #include <ss/socket.h>
  50. - #include <netdb.h>
  51.   #include <fcntl.h>
  52.   #include <time.h>
  53.   
  54. --- 23,31 ----
  55. Exit 1
  56.  
  57. laphroaig source % diff -c pop_dopop.c.old pop_dopop.c
  58. *** pop_dopop.c.old     Sun Oct 17 17:37:34 1993
  59. --- pop_dopop.c Thu Oct 21 22:08:54 1993
  60. ***************
  61. *** 1,7 ****
  62. --- 1,21 ----
  63.   #include "pop.h"
  64.   
  65. + #include <sys/types.h>
  66. + #include <sys/socket.h>
  67. + #include <sys/param.h>
  68. + #include <errno.h>
  69. + #include <netdb.h>
  70.   /* Variables global to this file */
  71.   
  72. + #ifdef AMITCP
  73. + #define SockBase SocketBase
  74. + #define cleanup_sockets()
  75. + #define s_close(s) CloseSocket(s)
  76. + #else
  77. + #include <ss/socket.h>
  78. + #endif
  79.   struct Library *SockBase ;
  80.   int havemail;
  81.   
  82. ***************
  83. *** 18,29 ****
  84.         sprintf(title,"Connecting to %s",pophost);
  85.         settitle();
  86.   
  87. !       if((SockBase = OpenLibrary( "inet:libs/socket.library", 1L )) == NULL)
  88.         {
  89.                 doreq("Error opening socket.library\n",bum);
  90.                 return(1);
  91.         }
  92.         setup_sockets( MAXSOCKS, &errno );
  93.   
  94.         if((hp=gethostbyname(pophost))==NULL)
  95.         {
  96. --- 32,54 ----
  97.         sprintf(title,"Connecting to %s",pophost);
  98.         settitle();
  99.   
  100. !       if(
  101. ! #ifdef AMITCP
  102. !          (SocketBase = OpenLibrary( "bsdsocket.library", 2L ))
  103. ! #else    
  104. !          (SockBase = OpenLibrary( "inet:libs/socket.library", 1L ))
  105. ! #endif
  106. !          == NULL)
  107.         {
  108.                 doreq("Error opening socket.library\n",bum);
  109.                 return(1);
  110.         }
  111. + #ifdef AMITCP
  112. +       SetErrnoPtr(&errno, sizeof errno);
  113. + #else
  114.         setup_sockets( MAXSOCKS, &errno );
  115. + #endif
  116.   
  117.         if((hp=gethostbyname(pophost))==NULL)
  118.         {
  119. ***************
  120. *** 420,423 ****
  121.         }
  122.   
  123.         return(1);
  124. ! }
  125. \ No newline at end of file
  126. --- 445,448 ----
  127.         }
  128.   
  129.         return(1);
  130. ! }
  131. Exit 1
  132.  
  133.  
  134. Tomi
  135.  
  136.